package com.caimiao.miao.page.home;

import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.view.PagerAdapter;

import com.caimiao.miao.interfaces.IBaseActView;
import com.caimiao.miao.interfaces.IBaseModel;
import com.caimiao.miao.interfaces.IBasePresenter;

import java.util.List;

import io.reactivex.Observable;

public interface IHomeContact {
    interface View extends IBaseActView<Presenter> {
        void setAdapter(PagerAdapter adapter);

        void setCurrentItem(int index);

        void setQRCode(Bitmap qrCode);

        void setHideQrCode();
    }

    interface Presenter extends IBasePresenter {
        void setCurrentItem(int index);

        void start();

        void stop();

        void setLogic(Context context, int width, int height);

        void startTimingShow();

        void addTouch(int x, int y);
    }

    interface Model extends IBaseModel {
        List<String> getAdverts(Context context);

        void setCurrentItem(int index);

        int getNextItem();

        long getIntervalTime();

        Bitmap getQrCode(Context context, int width, int height);

        void addTouch(int x, int y);

        Observable<Integer> getMasterEgg();
    }
}
